<?php 
$this->beginWidget('Block', array(
	'title' => CONSTANT::NAME_LIST,
));?>
<ul class='imglist'>
<?php foreach($dataProvider->getData() as $one):?>
	<li>
		<?php echo Yii::app()->img->config('default')->out($one->path,array(), array('width'=>'150', 'height'=>'150', 'cut'=>1))?>
		<ul>
			<li class="view">
				<?php echo CHtml::link('查看', $one->getAccessUrl('path'), array(
					'rel' => 'image_preview_group', 'title' => $one->desc,
				))?>
			</li>
			<li class="update">
				<?php echo CHtml::link('编辑', $this->createUrl('edit', array('id'=>$one->id)))?>
			</li>
			<li class="delete">
				<?php echo CHtml::link('删除', $this->createUrl('delete', array('id'=>$one->id)), array('class'=>'delete'))?>
			</li>
		</ul>
		<div class='acenter'>
			<div>名称：<?php echo CHtml::value($one, 'name')?></div>
			<div class='gray'><?php echo CHtml::value($one, 'create_time')?></div>
		</div>
	</li>
<?php endforeach;?>
</ul>
<?php $this->widget('lib.ext.fancybox.EFancyBox', array(
	'target' => 'a[rel=image_preview_group]',
	'config' => array(
		'transitionIn'=>'none',
		'transitionOut'=> 'none',
		'titlePosition'=>'over',
		'titleFormat' => 'js:function(title, currentArray, currentIndex, currentOpts) {
			return \'<span id="fancybox-title-over">\' + (currentIndex + 1) + \' / \' + currentArray.length + (title.length ? \' &nbsp; \' + title : \'\') + \'</span>\';
		}',
	),
))?>
<div class='pager'>
<?php $this->widget('LinkPager', array(
	'pages' => $dataProvider->pagination,
))?>
</div>
<?php $this->endWidget(); ?>
